package common

import (
	"fmt"
	"math/rand"
	"time"
)

type Crypt struct {
}

func (*Crypt) Make() string {
	//获取毫秒的时间戳
	now := time.Now().UnixNano()
	// 加入随机数增加唯一性
	rand.Seed(now)
	randomPart := rand.Intn(1000000)

	// 示例生成10位的卡券号
	couponNumber := fmt.Sprintf("YHJ-%d%06d", now, randomPart)
	return couponNumber
}
